<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="referrer" content="origin">
    <!-- TDK and ICO -->
    <title>Tend to Code_一个使用django和bootstrap搭建的个人博客_TendCode</title>

    <meta name="description"
          content="TendCode是一个Django搭建的博客，本网站后端使用Django框架搭建，前端使用Bootstrap框架，主要分享博主在Python以及其他编程语言的学习心得。">
    <meta name="keywords" content="Python自学,Python爬虫,Django博客,Python web开发,个人博客">
    <!--站长验证-->

    <link rel="shortcut icon" href="/static/blog/img/favicon.ico" type="image/x-icon"/>
    <!-- Bootstrap and font-awesome CSS -->
    <link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script src="/static/js/headroom.min.js"></script>
    <!-- blog CSS -->
    <link href="/static/css/base.css" rel="stylesheet">
    <link href="/static/css/detail.css?v=20190918.07" rel="stylesheet">
    <link href="/static/css/monokai.css?v=20190910.2" rel="stylesheet">
    <link href="/static/css/base_comment.css?v=20190114.554" rel="stylesheet">

    <!--根据cookies判断是否启用暗色主题-->

</head>
<body>
<!--导航开始-->

<nav class="navbar navbar-expand-md bg-white fixed-top blog-navbar py-md-0">
    <a class="navbar-brand d-md-none d-lg-block" id="site-logo-name" href="/">
        <strong class="px-2">TendCode</strong>
    </a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav ml-auto">
            <li class="nav-item mr-2">

                <a class="nav-link py-md-3 active" href="/"><i class="fa fa-home mr-1"></i>首页<span class="sr-only">(current)</span></a>
            </li>
            <li class="nav-item mr-2">

                <a class="nav-link py-md-3 " href="archive.html"><i class="fa fa-sitemap mr-1"></i>归档</a>
            </li>

            <li class="nav-item mr-2">

                <a class="nav-link py-md-3 " href="/tool/"><i class="fa fa-balance-scale mr-1"></i>在线工具</a>
            </li>


            <li class="nav-item mr-2 d-none d-lg-block">
                <a class="nav-link py-md-3" href="https://hao.tendcode.com" target="_blank"><i
                        class="fa fa-chrome mr-1"></i>微草导航</a>
            </li>


            <li class="nav-item mr-2 ">

                <a class="nav-link py-md-3 " href="/about/"><i class="fa fa-anchor mr-1"></i>关于</a>
            </li>
            <form class="nav-item navbar-form mr-2 py-md-2" role="search" method="get" id="searchform"
                  action="/search/">
                <div class="input-group">
                    <input type="search" name="q" class="form-control rounded-0" placeholder="站内搜索" autocomplete="off"
                           required=True>
                    <div class="input-group-btn">
                        <button class="btn btn-info rounded-0" type="submit"><i class="fa fa-search"></i></button>
                    </div>
                </div><!-- /input-group -->
            </form>
        </ul>
        <ul class="navbar-nav">

            <li class="nav-item mr-2">
                <a class="nav-link py-md-3" href="/accounts/login/?next=/">登录</a>
            </li>
            <li class="nav-item">
                <a class="nav-link py-md-3" href="/accounts/signup/?next=/">注册</a>
            </li>

        </ul>
    </div>
</nav>

<!--导航结束-->

<!--消息块-->


<!--回到顶部按钮-->
<div class="text-center" id="to-top">
    <i class="fa fa-chevron-up" id="btn-top" title="回到顶部"></i>
</div>

<!--主要内容块-->
<main>
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-lg-9 col-xl-10">
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb bg-white border-0 rounded-0 mb-2 py-2 f-15">
                        <li class="breadcrumb-item">
                            <i class="fa fa-home mr-1"></i><a href="/">首页</a>
                        </li>
                        <li class="breadcrumb-item">
                            <a href="/category?id={{article.category.id}}">{{article.category}}</a>
                        </li>
                        <li class="breadcrumb-item active d-none d-md-block" aria-current="page">{{article.title}}</li>
                        <li class="breadcrumb-item active d-md-none" aria-current="page">当前位置</li>
                    </ol>
                </nav>
                <div class="card rounded-0 border-0" id="article">
                    <div class="card-body px-2 px-md-3 pb-0">
                        <h1 class="card-title text-center font-weight-bold text-info">{{article.title}}</h1>
                        <hr>
                        <div class="text-center f-13">
                            <span class="mx-2" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="最后编辑于2019年10月10日">2019年9月20日 00:36</span>
                            <span class="mx-2">阅读 702</span>
                            <a class="mx-2 to-com" href="#comment-block">评论 20</a>
                        </div>
                        <div class="article-body mt-4 f-17" style="line-height:1.8">
                            {{article.content}}
                        </div>
                        <div class="tag-cloud my-4">

                            <a class="tags f-16" href="/tag/Web-development/">后端开发</a>

                            <a class="tags f-16" href="/tag/Django/">Django</a>

                        </div>
                        <nav class="more-page f-16">
                            <ul class="pagination justify-content-between">
                                <li class="page-item">

                                    <a class="d-none d-md-block" href="/article/ansible-and-docker/" title="上一篇：使用 Ansible 工具批量操作虚拟机集群，自动化安装 Docker">
                                        <i class="fa fa-chevron-left mr-1"></i>
                                        使用 Ansible 工具批量操作虚
                                    </a>
                                    <a class="d-md-none" href="/article/ansible-and-docker/">
                                        <i class="fa fa-chevron-left mr-1"></i>上一篇</a>

                                </li>
                                <li class="page-item">

                                    <a class="d-none d-md-block" href="/article/python-shell-cmd/" title="下一篇：使用 python 执行 shell 命令的几种常用方式">
                                        使用 python 执行 shell
                                        <i class="fa fa-chevron-right ml-1"></i>
                                    </a>
                                    <a class="d-md-none" href="/article/python-shell-cmd/">
                                        下一篇<i class="fa fa-chevron-right ml-1"></i>
                                    </a>

                                </li>
                            </ul>
                        </nav>

                        <div class="text-center">
                            <button class="btn btn-danger rounded-0" data-toggle="collapse" data-target=".multi-collapse" aria-expanded="false" aria-controls="sponsor-zfb sponsor-wx" style="line-height: 1;font-size: .8rem;">
                                <i class="fa fa-cny"></i>
                                如果文章对你有所帮助，可以赞助本站
                                <i class="fa fa-chevron-down"></i>
                            </button>
                        </div>
                        <div class="row p-3">
                            <div class="col text-center">
                                <div class="collapse multi-collapse" id="sponsor-wx">
                                    <div class="p-1 text-success">微信</div>
                                    <img class="w-75" src="/static/blog/img/reward_wx.png">
                                </div>
                            </div>
                            <div class="col text-center">
                                <div class="collapse multi-collapse" id="sponsor-zfb">
                                    <div class="p-1 text-primary">支付宝</div>
                                    <img class="w-75" src="/static/blog/img/reward_zfb.png">
                                </div>
                            </div>
                        </div>
                    </div>

                </div>


            </div>
        </div>
    </div>
    <!--图片预览-->
    <div class="modal fade" id="img-to-big" tabindex="-1" role="dialog" aria-labelledby="img-to-bigTitle" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered" role="document" style="max-width: 90%">
            <img class="rounded mx-auto d-block" alt="image" style="max-width: 100%">
        </div>
    </div>
    <!--前后文章-->

    <div class="more-blog" id="icon-pre-blog">
        <a href="/article/ansible-and-docker/">
            <i class="fa fa-angle-left fa-3x"></i>
        </a>
    </div>


    <div class="more-blog" id="icon-next-blog">
        <a href="/article/python-shell-cmd/">
            <i class="fa fa-angle-right fa-3x"></i>
        </a>
    </div>

</main>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<!--js cookie 插件-->
<script src="/static/js/js.cookie.min.js?v=20191123.12"></script>
<script src="https://cdn.bootcss.com/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
<script>
    $(function () {
        var myElement = document.querySelector(".blog-navbar");
        var headroom = new Headroom(myElement);
        headroom.init()
    });
</script>
<script src="/static/js/base.js?v=20191123.0909890"></script>


<footer class="container-fluid mt-4 py-0">
    <div class="card-body text-center px-0 f-14">
        <p class="card-text mb-1">Copyright&nbsp;&copy;&nbsp;<span id="year-info"></span>
            &nbsp;Powered&nbsp;by&nbsp;Django.
        </p>


    </div>
</footer>
</body>
</html>